package com.atcumt.Huawei;

import java.util.*;

/**
 * 字符串中第一个只出现一次的字符
 * map 存
 */
import java.util.*;

public class HJ7 {
    private char count(String str) {
        Map<Character, Integer> map = new HashMap<>();
        for (char ch : str.toCharArray()) {
            map.put(ch, map.getOrDefault(ch, 0) + 1);
        }
        for (char ch : str.toCharArray()) {
            if (map.get(ch) == 1) {
                return ch;
            }
        }
        return (char) -1;
    }


    public static void main(String[] args) {
        HJ7 solution = new HJ7();
        Scanner in = new Scanner(System.in);

        String s = in.nextLine();
        char result = solution.count(s);
        if (result == -1) {
            System.out.println(result);
        } else {
            System.out.println(result);
        }
    }
}
